Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Functions / Getting and Setting Patterns


GXSetStylePattern

You can use the GXSetStylePattern function to change a style object's pattern information.

void GXSetStylePattern(gxStyle target, 
                       const gxPatternRecord *pattern);
target
A reference to the style object whose pattern information you want to change.
pattern
A pointer to the new pattern information.
DESCRIPTION
The GXSetStylePattern function replaces the pattern information in the style object specified by the target parameter with the pattern information provided by the pattern parameter. You use the gxPatternRecord structure to provide pattern information.

Passing nil for the pattern parameter indicates that you want no pattern and QuickDraw GX removes any pattern information from the target style.

When you set a style's pattern property using this function, you are effectively changing the pattern for all shapes that share the style.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
style_is_nil 
parameter_out_of_range(debugging version)
empty_shape_not_allowed(debugging version)
ignorePlatformShape_not_allowed(debugging version)
illegal_type_for_shape(debugging version)
nil_style_in_glyph_not_allowed(debugging version)
complex_glyph_style_not_allowed(debugging version)
shapeFill_not_allowed(debugging version)
colorProfile_must_be_nil(debugging version)
Warnings 
graphic_type_cannot_be_dashed 
Notices (debugging version) 
dash_already_set 
tags_in_shape_ignored 
SEE ALSO
For a discussion of patterns, see "Patterns" on page 3-31.

For examples of adding patterns to shapes, see page 3-86 through page 3-91.

For a discussion of the gxPatternRecord structure and a description of what types of shapes you can use as pattern shapes, see "The Pattern Structure" on page 3-106.

To retrieve pattern information from a style object, use the GXGetStylePattern function, which is described on page 3-142.

To retrieve pattern information from a style object associated with a particular shape, use the GXGetShapePattern function, which is described in the next section. To specify pattern information for a style object associated with a particular shape, use the GXSetShapePattern function, which is described on page 3-146.

To determine where pattern shapes are drawn for a particular shape, use the GXGetShapePatternPositions function, which is described on page 3-147.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help